package ai.zixing.controller;

import ai.zixing.framework.context.support.ClassPathXmlApplicationContext;
import ai.zixing.service.CourseService;

public class CourseController {
    public static void main(String[] args) {
        // 1、创建 spring 容器对象
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("applicationContext.xml");
        // 2、从容器中获取 courseService 对象
        CourseService courseService = context.getBean("courseService", CourseService.class);
        // 3、调用 courseService 的 add() 方法。
        courseService.add();
    }
}
